package com.sm.controller;

import com.sm.annotation.IgnoreAuth;
import com.sm.model.VipDictionary;
import com.sm.service.VipDictionaryService;
import com.sm.util.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/vipDictionary")
public class VipDictionaryController {

    @Autowired
    private VipDictionaryService vipDictionaryService;

    /**
     *
     * @param type 类型1普通VIP 2超级VIP
     * @return
     */
    @ResponseBody
    @RequestMapping("/getList")
    public Msg getList(@RequestParam("type") Integer type) {
        List<VipDictionary> vipDictionaryList = vipDictionaryService.list(type);
        return Msg.success(vipDictionaryList);
    }
}
